.MODEL small
.STACK
.DATA
; constants
	SCREEN_WIDTH = 80
	SCREEN_HEIGHT = 25
; variables
	posx db 1
	posy db 1
	colour db 0
; macros
MClearScreen macro attribute
	push ax
		push bx
		push cx
		push dx
	xor bx, bx
	mov bh, attribute
	xor cx, cx				; upper left corner (0, 0)
	mov dh, SCREEN_HEIGHT	; upper right corner
	mov dl, SCREEN_WIDTH	; (SCREEN_WIDTH, SCREEN_HEIGHT)
	xor al, al				; INT 10h, ah = 07h, al = 00h
	mov ah, 06h				; 	Clear by scrolling down
		int 10h		
	pop dx
		pop cx
		pop bx
		pop ax
endm

.CODE
.STARTUP
	mov ax, 1003h
	mov bx, 0				; disable blinking. 
	int 10h
hoofdlus:
	MClearScreen colour
	add colour, 10h			; bh high + 1
	mov ah, 7				; char input, no echo, waits
		int 21h
	cmp al, 27				; esc exit
	jne hoofdlus
.EXIT
end